<?php

class FTaolijin extends BaseModel
{
    public $res;
    public $expire;

    public function getSource()
    {
        return "f_taolijin";
    }



    public function get_list($params = [],$method='find')
    {
        $page = intval($params['page']);
        $size = intval($params['limit']);
        if ($page > 0) {
            $page = ($page - 1) * $size;
        }
        $conditions = "";
        if($method=='find'){
            $cate_list = $this::find(
                array(
                    $conditions,
                    "order" => 'id desc',
                    'limit' => $size,
                    'offset' => $page
                )
            )->toarray();
        }else{
            $cate_list = $this->count(array(
                $conditions,
            ));
        }
        return $cate_list;
    }

}
